﻿@using InfoTech.VinhSon.Bussiness
@model IEnumerable<Category>
<link href="@Url.Content("~/Content/vertical_menu_basic.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Content/js/jquery.hoverIntent.minified.js")" type="text/javascript"> </script>
<script src="@Url.Content("~/Content/js/jquery.dcverticalmegamenu.1.1.js")" type="text/javascript"> </script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#mega-1').dcVerticalMegaMenu({
            rowItems: '3',
            speed: 'fast',
            //effect: 'slide',
            direction: 'left'
        });
    });
</script>
<div class="dcjq-vertical-mega-menu">
    <ul id="mega-1" class="menu left">
        <li><a class="first" href="/Trang-chu">Trang chủ</a></li>
        @{
            int count = Model.Count();
            foreach (Category category in Model.OrderBy(c => c.Priority ?? int.MaxValue).ThenBy(c => c.Name))
            {
                <li><a href="@category.GetUrl()" class="dc-mega @((--count) == 0 ? "last" : "")">@category.Name<span
                                                                                                                   class="dc-mega-icon"></span></a>
                    @{
                        if (category.Categories.Any())
                        {
                            <div class="sub-container non-mega" style="display: none; z-index: 1000;">
                                <ul class="sub">
                                    @foreach (Category sub in category.Categories.OrderBy(c => c.Priority ?? int.MaxValue).ThenBy(c => c.Name))
                                    {
                                        <li><a href="@sub.GetUrl()">@sub.Name</a></li>

                                    }
                                </ul>
                            </div>
                        }
                    }
                </li>
            }
        }
    </ul>
    <div class="clear"></div>
</div>
<div class="clear"></div>